using System;
using Cysharp.Threading.Tasks;
using MoonFramework.FSM;
using MoonFramework.Scripts.Tool;

namespace Entity.Monster.State
{
    public class MonsterDeadState : DeadState
    {
        public Monster Monster => (Monster)_actor;
        
        public override void Enter()
        {
            Monster.MonsterObject.InputCheckCollider.enabled = false;
            base.Enter();
        }

        protected override void DeadOver()
        {
            Monster.MonsterObject.Dead();
            // await UniTask.Delay(TimeSpan.FromSeconds(1));
            // Monster.MonsterObject.gameObject.MoonObjPushPool();
        }

        public override void Exit()
        {
            base.Exit();
            Monster.MonsterObject.InputCheckCollider.enabled = true;
        }
    }
}